Skip to content

refactor(meeting): meeting_room execute() Value→typed Response (#349)#411

Merged
foxzool merged 2 commits into
mainfrom
refactor/issue-349-meeting-room-typed
Jul 10, 2026
Merged

refactor(meeting): meeting_room execute() Value→typed Response (#349)#411
foxzool merged 2 commits into
mainfrom
refactor/issue-349-meeting-room-typed

Conversation

@foxzool

@foxzool foxzool commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire all 17 meeting_room leaf execute() / execute_with_options() return types from SDKResult<serde_json::Value> to typed Response structs (Closes [refactor] meeting: meeting_room 子树 execute() Value→typed 接线(287 行 typed 模型已就绪) #349).
  • Align response models with Feishu historic-version docs (Response body example + field tables); GuideDocumentType APIs have no structured apiSchema.
  • Empty-data write APIs (update/delete/instance reply) check is_success and default when data is absent.
  • Fix ErrorEventUids as object list (uid / original_time / error_msg) and complete SummaryVchat fields.

BREAKING (v0.18): callers must use typed fields instead of resp["field"]. Request bodies remain serde_json::Value.

Test plan

  • cargo test -p openlark-meeting --features meeting-room --lib (meeting_room + full lib suite)
  • cargo clippy -p openlark-meeting --features full --all-targets -- -D warnings
  • cargo fmt
  • CI green on PR

Note

High Risk
v0.18 breaking change across all meeting_room execute return types forces every consumer to migrate off JSON indexing; response schema alignment may surface previously masked shape mismatches at compile or runtime.

Overview
Breaking (v0.18): All 17 historic meeting_room leaf APIs (building, room, country, district, freebusy, instance, summary) now return typed SDKResult<XxxResponse> instead of SDKResult<serde_json::Value>. Callers must use struct fields (e.g. resp.buildings[0].building_id) instead of resp["field"]. Request bodies stay serde_json::Value.

meeting_room/responses.rs is expanded to match Feishu historic doc examples: shared models (BuildingInfo, RoomInfo), ID mapping shapes (buildings + custom_bulding_id typo), free_busy as HashMap<String, Vec<FreeBusySlot>>, and summary with PascalCase ErrorEventUids / EventInfos plus SummaryErrorEvent objects and fuller SummaryVchat.

Write paths without a data payload (update/delete building & room, instance reply) no longer rely on extract_response_data; they check is_success and return Default empty response types when data is missing.

Wiremock tests and unit deserializers are updated to official JSON shapes; CHANGELOG documents the breaking change.

Reviewed by Cursor Bugbot for commit 3076f43. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_4a8d88a4-86ec-4fa6-9116-6ec6259d127f)

@foxzool
foxzool force-pushed the refactor/issue-349-meeting-room-typed branch from 3760e5e to 0e525b4 Compare July 10, 2026 04:47
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_3e3246e9-6909-4691-9d60-f9e2dab3b72b)

foxzool added 2 commits July 10, 2026 13:13
…349)

Replace all 17 meeting_room leaf execute() return types with typed
Response structs aligned to Feishu historic-version Response body
examples. Empty-data write APIs (update/delete/instance reply) check
is_success and default when data is absent. BREAKING for v0.18.
Official field table defines ErrorEventUids[] as {uid, original_time,
error_msg}; Vec<String> would fail when the list is non-empty. Also
complete SummaryVchat with icon_type/description.
@foxzool
foxzool force-pushed the refactor/issue-349-meeting-room-typed branch from 0e525b4 to 3076f43 Compare July 10, 2026 05:13
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2f0af098-c1f2-4f50-a537-a19f6307f6a8)

@foxzool
foxzool merged commit ab510cc into main Jul 10, 2026
119 checks passed
@foxzool
foxzool deleted the refactor/issue-349-meeting-room-typed branch July 10, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] meeting: meeting_room 子树 execute() Value→typed 接线(287 行 typed 模型已就绪)

1 participant